<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据代理</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<dev id="root">
    <button v-on:click="hi">点我弹窗</button>
    <button v-on:click="hi2(222, $event)">点我再次弹窗</button>
</dev>

<script type="text/javascript">
    new Vue({
        el: '#root',
        data:{
            name: 'halk'
        },
        methods:{
            hi() {
                alert(event.target.innerText);
                alert('hello!')
            },
            hi2(value, event) {
                alert(event.target.innerText);
                alert(value);
                alert('hello world')
            },
        }
    });

</script>

</body>
</html>
